package com.example.demo.leetcode.top100;

/**
 * ******************************************************
 *
 * @author liugh9
 * @version 1.0
 * @classname _81爬楼梯
 * @description
 * @date 2023/06/28 17:12
 * <p>
 * ******************************************************
 */
public class _81爬楼梯 {

    public int climbStairs(int n) {
        int i_0 = 1;
        int i_1 = 1;
        for (int i = 2; i <= n; i++) {
            int temp = i_1;
            i_1 = i_0 + i_1;
            i_0 = temp;
        }
        return i_1;
    }
}
